Skip to content

Register MiniMax-M3/M2.7 context, thinking, and pricing parameters - #11

Open
octo-patch wants to merge 1 commit into
Windy3f3f3f3f:mainfrom
octo-patch:octo/20260729-parameter-refresh-recvqauuRfhYJy
Open

Register MiniMax-M3/M2.7 context, thinking, and pricing parameters#11
octo-patch wants to merge 1 commit into
Windy3f3f3f3f:mainfrom
octo-patch:octo/20260729-parameter-refresh-recvqauuRfhYJy

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: MiniMax model parameters were missing, so MiniMax-M3/M2.7 fell back to generic context, thinking, and pricing defaults.

What changed

Both the TypeScript (src/) and Python (python/mini_claude/) backends now carry the MiniMax model metadata instead of treating those models as unknown fallbacks:

  • Context windows — registered MiniMax-M3 at 1,000,000 tokens and MiniMax-M2.7 at 204,800 tokens in MODEL_CONTEXT, so they no longer collapse to the 200,000-token default.
  • Thinking detectionmodelSupportsThinking / _model_supports_thinking now recognize MiniMax models (M3 exposes adaptive/off, M2.7 is always-on), and modelSupportsAdaptiveThinking / _model_supports_adaptive_thinking treat only MiniMax-M3 as adaptive (M2.7 keeps thinking always-on).
  • Per-model pricing — added a getModelPricing / get_model_pricing lookup with a default that preserves the previous fixed rates (input $3, output $15, cache read 0.1x, cache write 1.25x per million tokens) and MiniMax overrides: M3 at $0.6 input / $2.4 output / $0.12 cache read (cache write billed at the input rate, as no separate rate is published), and M2.7 at $0.3 input / $1.2 output / $0.06 cache read / $0.375 cache write. Budget enforcement (getCurrentCostUsd / _get_current_cost_usd) and the per-turn cost line now bill through this lookup, so a MiniMax run is no longer charged at Claude rates.

Non-MiniMax models keep their previous behavior via the default entry.

Checks

  • npm run build
  • npm run test:unit (13 passed)
  • npm run test:integration (51 passed)
  • npm run test:py (13 passed)

Add the MiniMax-M3 (1,000,000-token) and MiniMax-M2.7 (204,800-token)
context windows, detect their thinking modes (M3 adaptive/off, M2.7
always-on), and bill both through a per-model pricing lookup instead of
the fixed Claude rates. Mirrored across the TypeScript and Python backends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant